package com.likl.controller;

import com.likl.domain.Book;
import com.likl.service.BookService;
import com.likl.service.MsgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * ClassName:springboot_study
 * Description:
 *
 * @Create: 2024/7/12 10:57
 * @author: likl
 * @e-mail: likl1102@foxmail.com
 * @QQ: 2514927731
 */
@RestController
@RequestMapping("/msg")
public class MsgController {

    @Autowired
    private MsgService msgService;

    @GetMapping("{phone}")
    public String get(@PathVariable String phone) {
        return msgService.get(phone);
    }

    @PostMapping
    public boolean check(String phone, String code) {
        return msgService.check(phone, code);
    }
}
